﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Eventhere.Work;
namespace Eventhere
{
    public partial class SeeUser : PhoneApplicationPage
    {
        Contact c;
        User user;
        public SeeUser()
        {
            InitializeComponent();

            
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (!String.IsNullOrEmpty(NavigationContext.QueryString["idC"]))
            {
                c = Repertory.GetContactById(int.Parse(NavigationContext.QueryString["idC"]));


                this.MailUser.Text += c.MailContact;
                this.Surname.Text += c.SurName;
                this.LastName.Text += c.LastName;
                if (c is User)
                {
                    user = (User)c;
                }
            }
        }
    }
}